\(\int \sec ^5(c+d x) (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx\) [894]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 91 \[ \int \sec ^5(c+d x) (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {a^2 \sec ^3(c+d x)}{3 d}-\frac {3 a^2 \sec ^5(c+d x)}{5 d}+\frac {2 a^2 \sec ^7(c+d x)}{7 d}+\frac {2 a^2 \tan ^5(c+d x)}{5 d}+\frac {2 a^2 \tan ^7(c+d x)}{7 d} \]

[Out]

1/3*a^2*sec(d*x+c)^3/d-3/5*a^2*sec(d*x+c)^5/d+2/7*a^2*sec(d*x+c)^7/d+2/5*a^2*tan(d*x+c)^5/d+2/7*a^2*tan(d*x+c)
^7/d

Rubi [A] (verified)

Time = 0.16 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {2952, 2686, 14, 2687, 276} \[ \int \sec ^5(c+d x) (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {2 a^2 \tan ^7(c+d x)}{7 d}+\frac {2 a^2 \tan ^5(c+d x)}{5 d}+\frac {2 a^2 \sec ^7(c+d x)}{7 d}-\frac {3 a^2 \sec ^5(c+d x)}{5 d}+\frac {a^2 \sec ^3(c+d x)}{3 d} \]

[In]

Int[Sec[c + d*x]^5*(a + a*Sin[c + d*x])^2*Tan[c + d*x]^3,x]

[Out]

(a^2*Sec[c + d*x]^3)/(3*d) - (3*a^2*Sec[c + d*x]^5)/(5*d) + (2*a^2*Sec[c + d*x]^7)/(7*d) + (2*a^2*Tan[c + d*x]
^5)/(5*d) + (2*a^2*Tan[c + d*x]^7)/(7*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2952

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rubi steps \begin{align*} \text {integral}& = \int \left (a^2 \sec ^5(c+d x) \tan ^3(c+d x)+2 a^2 \sec ^4(c+d x) \tan ^4(c+d x)+a^2 \sec ^3(c+d x) \tan ^5(c+d x)\right ) \, dx \\ & = a^2 \int \sec ^5(c+d x) \tan ^3(c+d x) \, dx+a^2 \int \sec ^3(c+d x) \tan ^5(c+d x) \, dx+\left (2 a^2\right ) \int \sec ^4(c+d x) \tan ^4(c+d x) \, dx \\ & = \frac {a^2 \text {Subst}\left (\int x^4 \left (-1+x^2\right ) \, dx,x,\sec (c+d x)\right )}{d}+\frac {a^2 \text {Subst}\left (\int x^2 \left (-1+x^2\right )^2 \, dx,x,\sec (c+d x)\right )}{d}+\frac {\left (2 a^2\right ) \text {Subst}\left (\int x^4 \left (1+x^2\right ) \, dx,x,\tan (c+d x)\right )}{d} \\ & = \frac {a^2 \text {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\sec (c+d x)\right )}{d}+\frac {a^2 \text {Subst}\left (\int \left (-x^4+x^6\right ) \, dx,x,\sec (c+d x)\right )}{d}+\frac {\left (2 a^2\right ) \text {Subst}\left (\int \left (x^4+x^6\right ) \, dx,x,\tan (c+d x)\right )}{d} \\ & = \frac {a^2 \sec ^3(c+d x)}{3 d}-\frac {3 a^2 \sec ^5(c+d x)}{5 d}+\frac {2 a^2 \sec ^7(c+d x)}{7 d}+\frac {2 a^2 \tan ^5(c+d x)}{5 d}+\frac {2 a^2 \tan ^7(c+d x)}{7 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 4.09 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.53 \[ \int \sec ^5(c+d x) (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=-\frac {a^2 \sec ^7(c+d x) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^4 (-672+182 \cos (c+d x)+736 \cos (2 (c+d x))+39 \cos (3 (c+d x))-192 \cos (4 (c+d x))-13 \cos (5 (c+d x))+448 \sin (c+d x)-104 \sin (2 (c+d x))-144 \sin (3 (c+d x))-52 \sin (4 (c+d x))+48 \sin (5 (c+d x)))}{6720 d} \]

[In]

Integrate[Sec[c + d*x]^5*(a + a*Sin[c + d*x])^2*Tan[c + d*x]^3,x]

[Out]

-1/6720*(a^2*Sec[c + d*x]^7*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^4*(-672 + 182*Cos[c + d*x] + 736*Cos[2*(c +
d*x)] + 39*Cos[3*(c + d*x)] - 192*Cos[4*(c + d*x)] - 13*Cos[5*(c + d*x)] + 448*Sin[c + d*x] - 104*Sin[2*(c + d
*x)] - 144*Sin[3*(c + d*x)] - 52*Sin[4*(c + d*x)] + 48*Sin[5*(c + d*x)]))/d

Maple [A] (verified)

Time = 0.27 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.24

method result size
parallelrisch \(-\frac {4 a^{2} \left (105 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-84 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+91 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+8 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{105 d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{7}}\) \(113\)
risch \(\frac {8 a^{2} \left (-35 i {\mathrm e}^{6 i \left (d x +c \right )}+35 \,{\mathrm e}^{7 i \left (d x +c \right )}-7 i {\mathrm e}^{4 i \left (d x +c \right )}-42 \,{\mathrm e}^{5 i \left (d x +c \right )}-9 i {\mathrm e}^{2 i \left (d x +c \right )}+11 \,{\mathrm e}^{3 i \left (d x +c \right )}+3 i-12 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{105 \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{7} d}\) \(120\)
derivativedivides \(\frac {a^{2} \left (\frac {\sin ^{6}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {\sin ^{6}\left (d x +c \right )}{35 \cos \left (d x +c \right )^{5}}-\frac {\sin ^{6}\left (d x +c \right )}{105 \cos \left (d x +c \right )^{3}}+\frac {\sin ^{6}\left (d x +c \right )}{35 \cos \left (d x +c \right )}+\frac {\left (\frac {8}{3}+\sin ^{4}\left (d x +c \right )+\frac {4 \left (\sin ^{2}\left (d x +c \right )\right )}{3}\right ) \cos \left (d x +c \right )}{35}\right )+2 a^{2} \left (\frac {\sin ^{5}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {2 \left (\sin ^{5}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}\right )+a^{2} \left (\frac {\sin ^{4}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{35}\right )}{d}\) \(248\)
default \(\frac {a^{2} \left (\frac {\sin ^{6}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {\sin ^{6}\left (d x +c \right )}{35 \cos \left (d x +c \right )^{5}}-\frac {\sin ^{6}\left (d x +c \right )}{105 \cos \left (d x +c \right )^{3}}+\frac {\sin ^{6}\left (d x +c \right )}{35 \cos \left (d x +c \right )}+\frac {\left (\frac {8}{3}+\sin ^{4}\left (d x +c \right )+\frac {4 \left (\sin ^{2}\left (d x +c \right )\right )}{3}\right ) \cos \left (d x +c \right )}{35}\right )+2 a^{2} \left (\frac {\sin ^{5}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {2 \left (\sin ^{5}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}\right )+a^{2} \left (\frac {\sin ^{4}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{35}\right )}{d}\) \(248\)

[In]

int(sec(d*x+c)^8*sin(d*x+c)^3*(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

-4/105*a^2*(105*tan(1/2*d*x+1/2*c)^6-84*tan(1/2*d*x+1/2*c)^5+91*tan(1/2*d*x+1/2*c)^4+8*tan(1/2*d*x+1/2*c)^3+3*
tan(1/2*d*x+1/2*c)^2-4*tan(1/2*d*x+1/2*c)+1)/d/(tan(1/2*d*x+1/2*c)+1)^3/(tan(1/2*d*x+1/2*c)-1)^7

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.26 \[ \int \sec ^5(c+d x) (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=-\frac {24 \, a^{2} \cos \left (d x + c\right )^{4} - 47 \, a^{2} \cos \left (d x + c\right )^{2} + 25 \, a^{2} - 2 \, {\left (6 \, a^{2} \cos \left (d x + c\right )^{4} - 9 \, a^{2} \cos \left (d x + c\right )^{2} + 5 \, a^{2}\right )} \sin \left (d x + c\right )}{105 \, {\left (d \cos \left (d x + c\right )^{5} + 2 \, d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) - 2 \, d \cos \left (d x + c\right )^{3}\right )}} \]

[In]

integrate(sec(d*x+c)^8*sin(d*x+c)^3*(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/105*(24*a^2*cos(d*x + c)^4 - 47*a^2*cos(d*x + c)^2 + 25*a^2 - 2*(6*a^2*cos(d*x + c)^4 - 9*a^2*cos(d*x + c)^
2 + 5*a^2)*sin(d*x + c))/(d*cos(d*x + c)^5 + 2*d*cos(d*x + c)^3*sin(d*x + c) - 2*d*cos(d*x + c)^3)

Sympy [F(-1)]

Timed out. \[ \int \sec ^5(c+d x) (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\text {Timed out} \]

[In]

integrate(sec(d*x+c)**8*sin(d*x+c)**3*(a+a*sin(d*x+c))**2,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.00 \[ \int \sec ^5(c+d x) (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {6 \, {\left (5 \, \tan \left (d x + c\right )^{7} + 7 \, \tan \left (d x + c\right )^{5}\right )} a^{2} + \frac {{\left (35 \, \cos \left (d x + c\right )^{4} - 42 \, \cos \left (d x + c\right )^{2} + 15\right )} a^{2}}{\cos \left (d x + c\right )^{7}} - \frac {3 \, {\left (7 \, \cos \left (d x + c\right )^{2} - 5\right )} a^{2}}{\cos \left (d x + c\right )^{7}}}{105 \, d} \]

[In]

integrate(sec(d*x+c)^8*sin(d*x+c)^3*(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/105*(6*(5*tan(d*x + c)^7 + 7*tan(d*x + c)^5)*a^2 + (35*cos(d*x + c)^4 - 42*cos(d*x + c)^2 + 15)*a^2/cos(d*x
+ c)^7 - 3*(7*cos(d*x + c)^2 - 5)*a^2/cos(d*x + c)^7)/d

Giac [A] (verification not implemented)

none

Time = 0.37 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.52 \[ \int \sec ^5(c+d x) (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=-\frac {\frac {35 \, {\left (3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{3}} - \frac {105 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 1015 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 1330 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 1302 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 469 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 67 \, a^{2}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{7}}}{840 \, d} \]

[In]

integrate(sec(d*x+c)^8*sin(d*x+c)^3*(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-1/840*(35*(3*a^2*tan(1/2*d*x + 1/2*c) + a^2)/(tan(1/2*d*x + 1/2*c) + 1)^3 - (105*a^2*tan(1/2*d*x + 1/2*c)^5 -
 1015*a^2*tan(1/2*d*x + 1/2*c)^4 + 1330*a^2*tan(1/2*d*x + 1/2*c)^3 - 1302*a^2*tan(1/2*d*x + 1/2*c)^2 + 469*a^2
*tan(1/2*d*x + 1/2*c) - 67*a^2)/(tan(1/2*d*x + 1/2*c) - 1)^7)/d

Mupad [B] (verification not implemented)

Time = 15.17 (sec) , antiderivative size = 215, normalized size of antiderivative = 2.36 \[ \int \sec ^5(c+d x) (a+a \sin (c+d x))^2 \tan ^3(c+d x) \, dx=\frac {4\,a^2\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left ({\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-4\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+3\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+8\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+91\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-84\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+105\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\right )}{105\,d\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^7\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^3} \]

[In]

int((sin(c + d*x)^3*(a + a*sin(c + d*x))^2)/cos(c + d*x)^8,x)

[Out]

(4*a^2*cos(c/2 + (d*x)/2)^3*(cos(c/2 + (d*x)/2)^7 + 105*cos(c/2 + (d*x)/2)*sin(c/2 + (d*x)/2)^6 - 4*cos(c/2 +
(d*x)/2)^6*sin(c/2 + (d*x)/2) - 84*cos(c/2 + (d*x)/2)^2*sin(c/2 + (d*x)/2)^5 + 91*cos(c/2 + (d*x)/2)^3*sin(c/2
 + (d*x)/2)^4 + 8*cos(c/2 + (d*x)/2)^4*sin(c/2 + (d*x)/2)^3 + 3*cos(c/2 + (d*x)/2)^5*sin(c/2 + (d*x)/2)^2))/(1
05*d*(cos(c/2 + (d*x)/2) - sin(c/2 + (d*x)/2))^7*(cos(c/2 + (d*x)/2) + sin(c/2 + (d*x)/2))^3)